<?php
// +----------------------------------------------------------------------
// | OneKeyAdmin [ Believe that you can do better ]
// +----------------------------------------------------------------------
// | Copyright (c) 2020-2023 http://onekeyadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: MUKE <513038996@qq.com>
// +----------------------------------------------------------------------
namespace plugins\blog\api\model;

use think\Model;
use app\api\model\User;

class BlogNotice extends Model
{
    // 关联模型
    public function blog()
    {
        return $this->hasOne(Blog::class, 'id', 'blog_id')->append(['url','comment_count','collect_count']);
    }
    
    public function user()
    {
        return $this->hasOne(User::class, 'id', 'user_id')->append(['url']);
    }
}